package com.itheima.d5_recursion;

/**
 * 目标：认识一下递归的形式。
 */
public class RecursionTest1 {
   public static int c=0;
    public static void main(String[] args) {
        f2();
        System.out.println(c);
    }

    // 直接方法递归
    public static void f() {
        System.out.println("fffffffffffffffffffff");
        f();
    }

    // 间接方法递归
    public static void f2() {
        System.out.println("f2f2f2f2f2f2f2f2f2");
        f3();
        c++;
    }

    public static void f3() {
        System.out.println("f3f3f3f3f3f3f3");
        f2();
        c++;

    }
}
